﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;
using BCEntity.OA.TeamWork.TeamWorkReply;

namespace BCData.OA.TeamWork.TeamWorkReply
{
    /// <summary>
    /// 协同办公回复
    /// </summary>
    public interface ITeamWorkReplyData
    {
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="teamWorkReplyId">协同办公回复Id</param>
        Task<bool> Exists(long teamWorkReplyId);
        /// <summary>
        /// 增加协同办公回复
        /// </summary>
        /// <param name="entity">协同办公回复信息</param>
        Task<TeamWorkReplyEntity> Add(TeamWorkReplyEntity entity);
        /// <summary>
        /// 更新协同办公回复
        /// </summary>
        /// <param name="entity">协同办公回复信息</param>
        Task<TeamWorkReplyEntity> Update(TeamWorkReplyEntity entity);
        /// <summary>
        /// 删除协同办公回复
        /// </summary>
        /// <param name="teamWorkReplyId">协同办公回复Id</param>
        Task<bool> Delete(long teamWorkReplyId);
        /// <summary>
        /// 删除协同办公回复
        /// </summary>
        /// <param name="teamWorkId">协同办公Id</param>
        /// <returns></returns>
        Task<bool> DeleteBatch(long teamWorkId);
        /// <summary>
        /// 获取协同办公回复
        /// </summary>
        /// <param name="teamWorkReplyId">协同办公回复Id</param>
        Task<TeamWorkReplyEntity> GetEntity(long teamWorkReplyId);
        /// <summary>
        /// 获取协同办公回复列表
        /// </summary>
        /// <param name="teamWorkId">协同办公Id</param>
        Task<IEnumerable<TeamWorkReplyEntity>> GetList(long teamWorkId);
        /// <summary>
        /// 获取协同办公回复分页列表
        /// </summary>
        /// <param name="teamWorkId">协同办公Id</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        Task<(IEnumerable<TeamWorkReplyEntity>, int)> Query(long? teamWorkId, DateTime? start, DateTime? end, int pageIndex, int pageSize);
    }
}